export const option = function () {
  return {
    refreshBtn: true,
    columnBtn: true,
    border: true,
    stripe: true,
    index: true,
    editBtn: true,
    delBtn: true,
    align: 'center',
    addBtn: !['view'].includes(this.type),
    menu: !['view'].includes(this.type),
    labelWidth: 140,
    indexLabel: '序号',
    column: [
      {
        label: '主要客户名称',
        prop: 'mainCustomerA',
        rules: [
          {
            required: true,
            message: '请输入主要客户名称',
            trigger: 'blur'
          }
        ]
      },
      {
        label: '业务开始时间',
        prop: 'beginDateA',
        type: 'date',
        rules: [
          {
            required: true,
            message: '请输入业务开始时间',
            trigger: 'blur'
          }
        ]
      },
      {
        label: '前年销售额(万元)',
        prop: 'salesPreviousYearA',
        precision: 4,
        type: 'number',
        rules: [
          {
            required: true,
            message: '请输入前年销售额(万元)',
            trigger: 'blur'
          }
        ]
      },
      {
        label: '去年销售额(万元)',
        prop: 'salesLastYearA',
        precision: 4,
        type: 'number',
        rules: [
          {
            required: true,
            message: '请输入去年销售额(万元)',
            trigger: 'blur'
          }
        ]
      },
      {
        label: '该客户占总比(%)',
        prop: 'ratioA',
        precision: 2,
        type: 'number'
      }
    ]
  }
}